The present invention relates to a method of and a corresponding device for transcoding a primary coded signal previously quantized with a first quantization scale into a secondary coded signal quantized with a second quantization scale, said method of transcoding comprising at least the steps of:
partially decoding the primary coded signal, using the first quantization scale and providing a dequantized signal including DCT coefficients,
quantizing the dequantized signal, using quantization matrices and the second quantization scale and providing a quantized signal,
encoding the quantized signal so as to obtain the secondary coded signal.
The invention also relates to a corresponding device for carrying out such a method of transcoding.
This invention is particularly relevant for the transcoding of MPEG compressed video signals.
Bit rate transcoding is a technique which allows a primary video stream encoded at a bit rate D1 to be converted into a secondary video stream encoded at a bit rate D2 lower than D1, the bit rate reduction being performed in order to meet requirements imposed by the means of transport during broadcasting. A possible method of transcoding is described in the document entitled xe2x80x9cSeamless Concatenationxe2x80x94A 21st Century Dreamxe2x80x9d, by M. J. Knee and N. D. Wells, and disclosed at the International Television Symposium (Montreux, Switzerland, Jun. 13-17, 1997). Said document presents a transcoder, which is depicted in FIG. 1 of the present invention. Such a transcoder comprises, in series, a variable length decoder (VLD), an inverse quantizer (IQ), a quantizer (Q), a variable length encoder and a buffer (VLC/BUF), and a rate control device (REG).
Unfortunately, such a transcoding method from a bit rate D1 to a bit rate D2 often leads to a substantial degradation of the picture quality, especially when the transcoded sequence of pictures is compared with the same sequence directly encoded at a bit rate D2, blurring effects or blocking artifacts being far more conspicuous on the transcoded sequence of pictures.
It is an object of the invention to provide a method of transcoding and a corresponding device which lead to a minimal degradation in picture quality.
To this end, the method of transcoding according to the invention is characterized in that it comprises a quantization step that uses correction matrices in order to cancel undesired DCT coefficients of the dequantized signal.
The use of correction matrices comes from the following observations. The primary signal has been encoded by a video encoder at a high bit rate D1. As a result of this high bit rate, small quantization scales are used, leading to a lot of small DCT coefficients equal to 1 or xe2x88x921. As a consequence, when quantizing, the encoder does not favor the cancellation of the small DCT coefficients especially in the high frequency domain, as shown in FIG. 2a. If the primary signal is encoded at a bit rate D2 lower than D1, most of the small high frequency DCT coefficients are set to 0, as shown on FIG. 2b, due to the use of higher quantization scales. However, when the primary signal is transcoded from the bit rate D1 to the bit rate D2, most of the small DCT coefficients of the primary coded signal remain xe2x80x981xe2x80x99 or xe2x80x98xe2x88x921xe2x80x99 after the re-quantization process, as shown in FIG. 2c. These coefficients are then undesired since they do not contribute to the picture quality. On the contrary, these coefficients are encoded using the escape coding defined by the MPEG-2 standard, which is bit consuming. For a constant bit rate encoding, the bits really allocated to the picture quality are consequently decreased, resulting in an increase of the quantization scale and leading to a degradation of the picture quality. The aim of the correction matrices is to correct this negative effect, which is due to the rounding process of the re-quantization step.
The method of transcoding according to the invention is also characterized in that the quantization step comprises a sub-step of testing the neighborhood of the DCT coefficients in order to determine if the correction matrices have to be applied or not.
Such a testing sub-step allows the correction matrices to be applied in a more efficient way, leading to an improvement of the quality of the transcoded pictures.
These and other aspects of the invention will be apparent from and will be elucidated with reference to the embodiments described hereinafter.